Skip to content

Remove --py2 argument#15670

Merged
hauntsaninja merged 1 commit into
python:masterfrom
cdce8p:remove-py2
Jul 14, 2023
Merged

Remove --py2 argument#15670
hauntsaninja merged 1 commit into
python:masterfrom
cdce8p:remove-py2

Conversation

@cdce8p

@cdce8p cdce8p commented Jul 14, 2023

Copy link
Copy Markdown
Collaborator

Remove the --py2 argument. It already creates a parser error.

mypy/mypy/main.py

Lines 1267 to 1271 in 7a94183

if options.python_version < (3,):
parser.error(
"Mypy no longer supports checking Python 2 code. "
"Consider pinning to mypy<0.980 if you need to check Python 2 code."
)

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@hauntsaninja hauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It's been long enough since we dropped support that this makes sense

@hauntsaninja
hauntsaninja merged commit 1958cb6 into python:master Jul 14, 2023
@cdce8p
cdce8p deleted the remove-py2 branch July 14, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants